AWDoR CO Data Hacking (Now with editor)

Discussion of hacking, editing and developments in Advance Wars games.
Remember, no Rom Requests
User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

AWDoR CO Data Hacking (Now with editor)

Post by Xenesis » Sat May 17, 2008 6:02 pm

Okay, this is big news. :o

First of all, the data for the stats a CO gives is SIMPLE AS fudge.

Also, this is for the US Version, Eg "Days of Ruin"

Eg, Lin's Data: 0x123D0C, 0x90 Long

Code: Select all

00 00 00 00 00 00 00 00 14 00 14 00 01 01 01 01
01 00 01 01 01 01 01 01 01 01 01 01 01 01 01 00
00 00 00 00 00 00 00 00 00 00 00 01 00 01 01 01
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 01 00 00 00 00 00 00 02 00 00
14 00 14 00 00 01 01 01 01 00 01 01 01 01 01 01
01 01 01 01 01 01 01 00 00 00 00 00 00 00 00 00
00 00 00 01 00 01 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 00

Code: Select all

Units
123D0C - Lin's CO Stats (0x90 in Length)
00 - ??
00 - ??
00 - Movement Bonus
00 - ???
00 - Healing Aura
00 - Vision Bonus 
00 - Range Bonus
00
14 00 - Attack Bonus
14 00 - Defence Bonus
01 - COZ Size
01 01 01 01 00 - Unknown
01 - Infantry Unit | For the units, 00 = No COZ Boost, 01 = COZ Boost
01 - Mech
01 - Bike
01 - Recon
01 - Flare
01 - Anti-Air
01 - Tank
01 - Medium Tank
01 - Wartank
01 - Artillery
01 - Rockets
01 - Missiles
01 - Rig
00 - Fighter
00 - Bomber
00 - Duster
00 - Seaplane
00 - Battle Copter
00 - Transport Copter
00 - Battleship
00 - Carrier
00 - Submarine
00 - Cruiser
00 - Lander
00 - Gunboat
01 - Anti-Tank
00 - Unknown
01 - Infantry - Repeats length of unit list, unknown what function it has on units.
01 - Mech
01 - Bike
01 - Recon
01 - Flare
01 - Anti-Air
01 - Tank
01 - Medium Tank
01 - Wartank
01 - Artillery
01 - Rockets
01 - Missiles
01 - Rig
01 - Fighter
01 - Bomber
01 - Duster
01 - Seaplane
01 - Battle Copter
01 - Transport Copter
01 - Battleship
01 - Carrier
01 - Submarine
01 - Cruiser
01 - Lander
01 - Gunboat
01 - Anti-Tank
00 - Unknown
-Repeats the format above here, except for the CO Power's stats instead of the D2D
Notes:
-All stat boosts seem to work fine D2D.
-Negative stats indeed work for firepower and defence, so you can get stat reductions for your own troops in the COZ. <_<;
-Other COP related effects are obviously elsewhere - very much like AW2/DS and are likely to be custom routines for each CO.
-If the CO Zone can become larger than 5, it will fill up the entire screen (Like in the CO Power), so the largest growing zone you can have is 3, and the largest fixed zone (Forsythe/Caulder) is 5.

CO Stats Locations:

Days of Ruin:

Will - 123BEC
Brenner - 123C7C
Lin - 123D0C
Isabella - 123D9C
Tasha - 123E2C
Gage - 123EBC
Forsythe - 123F4C
Waylon - 123FDC
Greyfield - 12406C
Penny - 1240FC
Tabitha - 12418C
Caulder - 12421C

Dark Conflict:

Will - 1239FC
Brenner - 123A8C
Lin - 123B1C
Isabella - 123BAC
Tasha - 123C3C
Gage - 123CCC
Forsythe - 123D5C
Waylon - 123DEC
Greyfield - 123E7C
Penny - 123F0C
Tabitha - 123F9C
Caulder - 12402C

Editor:
Just a modified version of the AW1/AW2 CO editor that Codereaper made and I converted.
Editor
Picture
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Re: AWDoR CO Data Hacking (Now with editor)

Post by RadioShadow » Sun May 18, 2008 3:17 am

Sweet! :)

User avatar
Delta_Angelfire
Location: Oblivion

Re: AWDoR CO Data Hacking (Now with editor)

Post by Delta_Angelfire » Tue May 20, 2008 2:59 am

Question! Can you have negative movement, range, vision, or healing modifiers?

User avatar
RadioShadow
Rank: Holding the Mega Drive controller
Location: UK, England

Re: AWDoR CO Data Hacking (Now with editor)

Post by RadioShadow » Fri May 23, 2008 7:58 am

Delta_Angelfire wrote:Question! Can you have negative movement, range, vision, or healing modifiers?
This basing from my AW2 hacking knowledge but the same principles should apply.

Range - Yes, but only -1 range. Go -2 or lower and Indirect units become crazy.
Movement - It's possible but it will have some strange affects on the game.
Range - Shouldn't be a problem. Just don't put something like -20 Range in. :P
Healing - Yep, you could make Caulder's power decrease his units HP.

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Re: AWDoR CO Data Hacking (Now with editor)

Post by Xenesis » Fri May 23, 2008 11:13 pm

The fields work differently however.

It's always worth a shot.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
Gheizen64

Let's start a brave New World.

Post by Gheizen64 » Wed Jun 04, 2008 6:49 am

Ok guys, i wanted to do this for a while, so i'll try start a little revolution.

You all read it:
- Tabby is unba
- Isabella need a nerfed power
- Tasha lol

Every days and night. Are u bored because of this? Well, thanks to Xen now we can do something about all this. We can in fact, fix the game.

At least, at the best of our possibilities. Try to look in this topic viewtopic.php?f=11&t=10388&p=294812

The next step? We can apply the changes we are all waiting for (you need an hacked Rom howewer to be done), and start playing with the new settings, giving some feedback and, in return, get more fun.

Before releasing the first unofficial balanced version of the game (can we even post link to hacked roms here?), i have to get some feedback on the changes we have to do. First, i must say that i would like very much to leave specialist CO (ex. all-air CO) because they add flavor to the game in my mind.

With that said, i think the changes we all agree on are:
- Isabella get only 1 move 1 range from her COP. I don't think is necessary to limit the bonus movement only to direct unit, you wouldn't move indirect unit anyway, with the only exception of the Battleship (and beyond that, i don't know if we can split the bonus yet :) )
- Tabitha get defense nerfed, or overall nerfed. Reducing it to a 4-4 unit however doesn't change a lot, some little exception aside (like damaged missiles against a Tabby duster, 'cause of the nature of air unit that have no terrain defense), all attack do the same damage that against a 5 star Tabby (due the the damage sistem, every star added decrease the added bonus). So i think, to preserve the idea of a single, deadly unit that's Tabby, to reduce her to 5-1 star (or 180-140 if you prefer). 5-0 could also be fine, however, i think it may prove too swingy on the other side, as area 0 is a pretty akward penality. As for her COP, we have no way to fix it as i know, so it will do.
- Tasha has a dual problem. First, she's outclassed by Tabitha in every aspect, 'cause area 1 isn't that great improvement over area 0 (compared for instead to the difference between area 1 and 2, or 2 and 3). Second, her COP is utterly useless. You rarely have more then 3 or 4 air unit in a map, and 1 of them is Tasha herself, that can't get any benefit from her COP.
So, firstly her COP has to be stronger to get some use. I was thinking about giving +2 MP to ALL unit, but there's a problem in that. If you gave movement bonus to all unit you have to give also the aura bonus (4-2), and that would be too swingy (7-movement OHKOing everything War Tanks? no ). So we could stick with 1-1 bonus while in her COP (that's better than Will's COP). Her COP would then become +2 MP to all unit and 1-1 star bonus (120 everything).
Secondly, we have to think how to improve her D2D bonus. Because Waylon is the Air defense master, we can stick to two ways - Increased aura range or Increased attack star (bonus movement would be too difficult to balance i suppose). I like the 2 bonus star more, gaving her the most deadly air unit in the game :twisted: (remember that the improvement from 4 to 6 is about the improvement from 1 to 2), and surpassing Tabby in her specific area. We could discuss this a little, i will do some maths to see what specifical improvement would give those two star in actual game ('specially in OHKO differences).

And those are the COS everyone agree they needed to change. Then there is another CO that would surely use a little buff, Lin, and two i'm undecided upon, Will and Gage (sound like Will and Grace lol).
Lin is problematic, improving her aura would make her instantly overpowered, outclassing Will, Gage and Isabella (apart air and sea unit) in one move. Giving her an extra star in attack make her feel too much like Tabby, and giving her an extra star defense make her the Waylon of land unit. For now i'm more on the extra defense star, giving her that "you can't kill me because i'm intelligent and i have too much trick under my sleeve" feeling :mrgreen:
As for Will and Gage, i'm actually playing them with 3-0 (Will) and an aura of 3 (Gage, giving bonus only to indirect and navy, doesn't benefit as much as Will from aura improvement), but they could be fine already.

If people will feedback positively enough on the first 3 changes (Tabby, Tasha, Isa), i will officialize the changes and post something (if i can). Some more pondering will be required on the last 3 CO changes, however, if the community feels that there's enough need to change even those last 3 CO (i think Lin is the most on the edge), we will move in that direction basing on players feedback.

I am looking forward to play you on the net! :) (i don't remember my Friend code now, i will post it tomorrow morning lol)

P.S: please correct me! i have to learn and to improve my horrible english :lol:
AW:DoR Friend code - 421050986296 (for testing with hacked roms)
AW:DC Friend code - don't remember right now

User avatar
HPD
Tri-Star CO
Tri-Star CO
Rank: Mentat
Location: The Mountain

Re: Let's start a brave New World.

Post by HPD » Wed Jun 04, 2008 8:04 am

As far as ROMs go, you're not allowed to provide or ask for them on these boards.
"So when I say the fudge shaman flies he goddamn well flies and that's that." - Narts
"My motto is that there are far too many women in the world to waste time with men." - thefalman
"It's just that I'm not really aware of how a common conversation goes." - Imano Ob, talking on MSN about talking on MSN
"As for FE8, that was IS' variant of Man Spam - Dudes with Swords edition." - Xenesis

User avatar
Delta_Angelfire
Location: Oblivion

Re: Let's start a brave New World.

Post by Delta_Angelfire » Wed Jun 04, 2008 10:42 am

It sounds like it cold be interesting, but I was just going to take the hack in a completely different direction with all new custom COs. However, if you 're looking for someone to test against, I'm expecting to be doing some CO hacs by the end of the week.

User avatar
Gheizen64

Re: Let's start a brave New World.

Post by Gheizen64 » Wed Jun 04, 2008 4:55 pm

The "completely new ways" to custom COS, are a lot more difficult to do, so i'll stick with the normal mode with some tweaking.


To Xenesis, if he is reading, the program he posted doesn't have a lateral scrolling function, so i can't edit anything past battleship, can we work something on this?
I'll search some topic on rom tweaking by myself when i'll have some more time.

Not being able to share roms mean we have to go by PM i suppose :|
AW:DoR Friend code - 421050986296 (for testing with hacked roms)
AW:DC Friend code - don't remember right now

User avatar
DTaeKim
Star CO
Star CO
Rank: War Room Legend
Location: In your base, killing your d00ds

Re: Let's start a brave New World.

Post by DTaeKim » Thu Jun 05, 2008 1:22 am

The Isabella change is the one most accepted at the moment.

I believe Tabitha's issue is the fact she cannot be 2HKO reliably without some serious firepower on your end coupled with her ability to OHKO any same-type unit match-up on roads. Lin is the only other CO who can be 3HKO, but she requires defensive terrain in order to survive. Tabitha probably needs a firepower or defense change, but not both in my opinion, or else she loses her aura of intimidation.

Tasha and Waylon both have issues, as does Greyfield.
What can change the nature of a man?

User avatar
Gheizen64

Re: Let's start a brave New World.

Post by Gheizen64 » Thu Jun 05, 2008 2:17 am

DTaeKim wrote:The Isabella change is the one most accepted at the moment.

I believe Tabitha's issue is the fact she cannot be 2HKO reliably without some serious firepower on your end coupled with her ability to OHKO any same-type unit match-up on roads. Lin is the only other CO who can be 3HKO, but she requires defensive terrain in order to survive. Tabitha probably needs a firepower or defense change, but not both in my opinion, or else she loses her aura of intimidation.

Tasha and Waylon both have issues, as does Greyfield.
As i said, nerfing Tabby to 4-4 doesn't change her ability to resist attack. The change between 4 and 5 star are almost nihil.
She still can't be 2HKO by anyone, execpt maybe by will ora tasha dual air unit. Nerfing attack isn't suited to his arrogant aggressive character, so i believe nerfing heavily defense, to 1 or 0 star, is the way.

I assumed Greyfield was a respectable CO in sea map, are you saying that he is imba on sea map, or are you saying that he is utterly useless outside of them?
I assume the latter considering the small amount of naval map, but if we are going to "fix" him, we could also "fix" caulder :|

EDIT: BTW Friend Code is 421050986296
AW:DoR Friend code - 421050986296 (for testing with hacked roms)
AW:DC Friend code - don't remember right now

User avatar
DTaeKim
Star CO
Star CO
Rank: War Room Legend
Location: In your base, killing your d00ds

Re: Let's start a brave New World.

Post by DTaeKim » Thu Jun 05, 2008 7:55 am

He's unstoppable on naval maps, and akin to Lin on non-naval maps.

He needs to be less situational.
What can change the nature of a man?

User avatar
Terragent
Rank: Cussing Aussie
Location: Adelaide, Australia

Re: Let's start a brave New World.

Post by Terragent » Thu Jun 05, 2008 9:48 am

Yeah, I'd fix Greyfield by toning down his naval defence and leaving him as kind of worthless outside naval maps. I figure that specialists will be specialists.

User avatar
Gheizen64

Re: Let's start a brave New World.

Post by Gheizen64 » Thu Jun 05, 2008 6:08 pm

Mmh, i never played a lot with Greyfield... some suggestion on how to fix him? A Gage mirror (1-2) with bonus to all air unit would be fine?

For now the fix i had in mind would be:

Tabby- 5-1
Isa - COP 1 mov, 1 range
Tasha - 6-2, COP 2 mov to all unit but only 1-1 bonus

With a Tabby nerfed like this, Lin probably won't need a fix.
AW:DoR Friend code - 421050986296 (for testing with hacked roms)
AW:DC Friend code - don't remember right now

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Re: Let's start a brave New World.

Post by Xenesis » Thu Jun 05, 2008 6:52 pm

With a Tabby nerfed like this, Lin probably won't need a fix.
Lin's still generally inferior to the bulk of the cast, like Brenner, Will or Forsythe.
Tabby- 5-1
Hmm. In all honesty, I think a cut to her attack, but only slightly to her defence would be more interesting. 1-5?
Tasha - 6-2, COP 2 mov to all unit but only 1-1 bonus
Uh, why are you nerfing her CO Power - it's pretty bad as it is. :/

Both Tasha and Waylon could both be interesting with +1 to their COZ though.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
Gheizen64

Re: Let's start a brave New World.

Post by Gheizen64 » Thu Jun 05, 2008 7:18 pm

Xenesis wrote:
With a Tabby nerfed like this, Lin probably won't need a fix.
Lin's still generally inferior to the bulk of the cast, like Brenner, Will or Forsythe.
Tabby- 5-1
Hmm. In all honesty, I think a cut to her attack, but only slightly to her defence would be more interesting. 1-5?
Tasha - 6-2, COP 2 mov to all unit but only 1-1 bonus
Uh, why are you nerfing her CO Power - it's pretty bad as it is. :/

Both Tasha and Waylon could both be interesting with +1 to their COZ though.
Well, i suppose it's only a matter of preference. I think Tabby is better as the arrogant, aggressive one, not the opposite, as far as balance go, both could be allright (even if 1-5 is probably slighty worse than 5-1)

Second, the COP is improved, not nerfed. Tasha normally give 2 MP bonus only to AIR unit :o

Last, Waylon already rules the sky 8)

EDIT: Xen, have you read the little problem i have with your editor? It lack a lateral scroll function :)
AW:DoR Friend code - 421050986296 (for testing with hacked roms)
AW:DC Friend code - don't remember right now

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Re: Let's start a brave New World.

Post by Xenesis » Thu Jun 05, 2008 7:23 pm

Second, the COP is improved, not nerfed. Tasha normally give 2 MP bonus only to AIR unit
Ah, you're right.

My apologies, it seems the stress and insomnia is affecting my literary skills.
EDIT: Xen, have you read the little problem i have with your editor? It lack a lateral scroll function
Yeah, I'm aware of the problem. My java knowledge is incredibly limited, but I suppose I can poke one of my Computer Science student friends into helping me with it.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
Gheizen64

Re: Let's start a brave New World.

Post by Gheizen64 » Thu Jun 05, 2008 7:41 pm

NP, i can work with that too, and i'm actually doing some research on how to Hack rom by myself, i've always wanted to, and this look like a good reason to start 8)

EDIT: i managed to uncompress the rom! :lol:
Now i have to find the right prog for editing :twisted:

EDIT2: i managed to open the uncompressed files with an Hex editor, but most of the content is obscure, i have to still work a little to find COs attributes :|
AW:DoR Friend code - 421050986296 (for testing with hacked roms)
AW:DC Friend code - don't remember right now

User avatar
Terragent
Rank: Cussing Aussie
Location: Adelaide, Australia

Re: Let's start a brave New World.

Post by Terragent » Fri Jun 06, 2008 9:38 am

Hah, to be honest I don't know how to do scrolling. I could look through the API for you, though.

User avatar
Delta_Angelfire
Location: Oblivion

Re: AWDoR CO Data Hacking (Now with editor)

Post by Delta_Angelfire » Fri Jun 06, 2008 10:30 am

Hmm, I finally managed to start testing this out... but it doesn't seem like you can do negative healing. negative movement, range, and vision seem to work fine though, just don't forget you need a -1 in the first of the two damage/defense bits to make negatives work properly there.

edit: nvm wht used to be here., i'm a hacking n00b. Don't mind me.

User avatar
Delta_Angelfire
Location: Oblivion

Re: Let's start a brave New World.

Post by Delta_Angelfire » Fri Jun 06, 2008 11:54 am

Gheizen64 wrote:NP, i can work with that too, and i'm actually doing some research on how to Hack rom by myself, i've always wanted to, and this look like a good reason to start 8)

EDIT: i managed to uncompress the rom! :lol:
Now i have to find the right prog for editing :twisted:

EDIT2: i managed to open the uncompressed files with an Hex editor, but most of the content is obscure, i have to still work a little to find COs attributes :|
You should just be editing the codes within the compressed rom. Much easier and (I think) the only way the Java editor works (and Xens bit addresses too). Now if only I could find a way to make the conversion table display decimal numbers instead of ascii code, finding cool things would be a lot easier...

User avatar
Gheizen64

Re: Let's start a brave New World.

Post by Gheizen64 » Sat Jun 07, 2008 6:27 am

Yes Xen worked on the Uncompressed roms. I was a little scared to open a 64 Mb text files, but i'll try :)

P.S: it's exam time until late July here, my time next to zero right now :cry:

EDIT: i found the CO stats pretty easily, but there's no way i could edit special property or COP by using that HEX editor, lol :lol:
AW:DoR Friend code - 421050986296 (for testing with hacked roms)
AW:DC Friend code - don't remember right now

CodeReaper
Rank: Syogun Changer
Location: TX, USA

Re: Let's start a brave New World.

Post by CodeReaper » Thu Jun 12, 2008 12:35 pm

Xenesis wrote:
EDIT: Xen, have you read the little problem i have with your editor? It lack a lateral scroll function
Yeah, I'm aware of the problem. My java knowledge is incredibly limited, but I suppose I can poke one of my Computer Science student friends into helping me with it.
EDIT: Xen, please post the source code and I'll try to put in a scrollbar tomorrow.

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Re: Let's start a brave New World.

Post by Xenesis » Fri Jun 13, 2008 12:00 pm

CodeReaper wrote:EDIT: Xen, please post the source code and I'll try to put in a scrollbar tomorrow.
http://warsworldnews.com/xenesis/AWDoRCOEditor.java
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
Delta_Angelfire
Location: Oblivion

Re: Let's start a brave New World.

Post by Delta_Angelfire » Fri Jun 13, 2008 1:24 pm

huh, that code doesn't actually look all that complicated. Now if only I knew how to make a jar file, I might be able to fix it myself... but google gives me nothing helpful.

User avatar
Dragonite
Rank: My face is beaming.
Location: the netherlands(mostly)

Re: Let's start a brave New World.

Post by Dragonite » Sun Jun 15, 2008 4:19 am

HPD wrote:As far as ROMs go, you're not allowed to provide or ask for them on these boards.
this board has... RULES?!

joking aside,globally reading trough it,this topic seems intresting.

CodeReaper
Rank: Syogun Changer
Location: TX, USA

Re: Let's start a brave New World.

Post by CodeReaper » Sun Jun 15, 2008 1:14 pm

I couldn't figure out how to put scroll bars over the whole thing, so I redesigned the editor to be small enough to not need window scroll bars. It's only 486x198, so even if you have a lousy 640x480 screen resolution, it will still fit.

Picture

Download

Source Code:

Code: Select all

/*
* AWDoRCOEditor.java
*/

import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javax.swing.event.*;

/**
* @author CodeReaper, converted to AW2 by Xenesis
*/
public final class AWDoRCOEditor extends JFrame
{
    public static void main(String[]args)
    {
        RandomAccessFile gameFile = null;
        
        JFileChooser fileChooser = new JFileChooser();
        
        int open = fileChooser.showOpenDialog( null );
        
        try
        {
            gameFile = new RandomAccessFile( fileChooser.getSelectedFile().toString(), "rw" );
        }
        catch( NullPointerException ex )
        {
            System.exit(0);
        }
        catch( FileNotFoundException ex )
        {
            System.exit(0);
        }
        
        AWDoRCOEditor editor = new AWDoRCOEditor( gameFile );
    }
    
    private static final int
            START_INDEX = 0x123BEC,
		CO_DATA = 0x90,
		COP_DATA = 0x48,
		WILL_I = 0,
		BRENNER_I = 1,
		LIN_I = 2,
		ISABELLA_I = 3,
		TASHA_I = 4,
		GAGE_I = 5,
		FORSYTHE_I = 6,
		WAYLON_I = 7,
		GREYFIELD_I = 8,
		PENNY_I = 9,
		TABITHA_I = 0x0A,
		CAULDER_I = 0x0B,
                BYTE_MASK = 0xFF;
    
    private static final int
            LIST_WIDTH = 80,
            LIST_HEIGHT = 140,
            LABEL_WIDTH = 40,
            BOX_WIDTH = 40,
            BLOCK_WIDTH = LABEL_WIDTH + BOX_WIDTH,
            BLOCK_HEIGHT = 20,
            NUM_ROWS = 7,
            NUM_COLS = 5,
            NUM_CO_SLOTS = 22,
            NUM_LABELS = 35,
            BUTTON_HEIGHT = 20,
            WINDOW_WIDTH = LIST_WIDTH + ( NUM_COLS * BLOCK_WIDTH ),
            WINDOW_HEIGHT = LIST_HEIGHT + BUTTON_HEIGHT;
    
    private static final String
            TITLE = "Days of Ruin CO Editor",
            SAVE = "Save",
		WILL = "Will",
		BRENNER = "Brenner",
		LIN = "Lin",
		ISABELLA = "Isabella",
		TASHA = "Tasha",
		GAGE = "Gage",
		FORSYTHE = "Forsythe",
		WAYLON = "Waylon",
		GREYFIELD = "Greyfield",
		PENNY = "Penny",
		TABITHA = "Tabitha",
		CAULDER = "Caulder",
		COP = "CO Power",
		MOV = "Move",
		VIS = "Vis",
		ATK = "Atk",
		DEF = "Def",
		COZ = "Zone",
		HEAL = "Heal",
		RANGE = "Range",
		INF = "Inf",
		MECH = "Mech",
		BIKE = "Bike",
		RECON = "Recon",
		FLARE = "Flare",
		AA = "AA",
		TANK = "Tank",
		MTANK = "MTnk",
		WTANK = "WTnk",
		ARTY = "Artly",
		ROCKET = "Rockt",
		MISSL = "Missl",
		RIG = "Rig",
		FIGHT = "Fight",
		BOMBR = "Bomb",
		DUST = "Dustr",
		SEAPL = "Seapl",
		BCOPT = "BCopt",
		TCOPT = "TCopt",
		BSHIP = "BShip",
		CARR = "Carr",
		SUB = "Sub",
		CRUISER = "Crusr",
		LAND = "Landr",
		GUNB = "Gunbt",
		ANTI = "ATank",
		BLANK = " ";

    private static final int[] WEAPON_OFFSETS = defineWeaponOffsets();
    
    private static int[] defineWeaponOffsets()
    {
        int[] weapon_offsets = new int[ NUM_CO_SLOTS ];
        
        weapon_offsets[0] = 0;
        weapon_offsets[1] = COP_DATA;
        weapon_offsets[2] = CO_DATA*BRENNER_I;
        weapon_offsets[3] = CO_DATA*BRENNER_I + COP_DATA;
        weapon_offsets[4] = CO_DATA*LIN_I;
        weapon_offsets[5] = CO_DATA*LIN_I + COP_DATA;
        weapon_offsets[6] = CO_DATA*ISABELLA_I;
        weapon_offsets[7] = CO_DATA*ISABELLA_I + COP_DATA;
        weapon_offsets[8] = CO_DATA*TASHA_I;
        weapon_offsets[9] = CO_DATA*TASHA_I + COP_DATA;
        weapon_offsets[10] = CO_DATA*GAGE_I;
        weapon_offsets[11] = CO_DATA*GAGE_I + COP_DATA;
        weapon_offsets[12] = CO_DATA*FORSYTHE_I;
        weapon_offsets[13] = CO_DATA*WAYLON_I;
        weapon_offsets[14] = CO_DATA*WAYLON_I + COP_DATA;
        weapon_offsets[15] = CO_DATA*GREYFIELD_I;
        weapon_offsets[16] = CO_DATA*GREYFIELD_I + COP_DATA;
        weapon_offsets[17] = CO_DATA*PENNY_I;
        weapon_offsets[18] = CO_DATA*PENNY_I + COP_DATA;
        weapon_offsets[19] = CO_DATA*TABITHA_I;
        weapon_offsets[20] = CO_DATA*TABITHA_I + COP_DATA;
        weapon_offsets[21] = CO_DATA*CAULDER_I;

        
        return weapon_offsets;
    }
    
    private static final int[] UNIT_OFFSETS = defineUnitOffsets();
    
    private static int[] defineUnitOffsets()
    {
        int[] unit_offsets = new int[ NUM_LABELS ];
        
        unit_offsets[0] = 		9;
        unit_offsets[1] = 		8;
        unit_offsets[2] = 		11;
        unit_offsets[3] = 		10;
        unit_offsets[4] = 		12;
        unit_offsets[5] = 		2;
        unit_offsets[6] = 		4;
        unit_offsets[7] = 		5;
        unit_offsets[8] = 		6;
        unit_offsets[9] = 		18;
        unit_offsets[10] = 		19;
        unit_offsets[11] = 		20;
        unit_offsets[12] = 		21;
        unit_offsets[13] = 		22;
        unit_offsets[14] = 		23;
        unit_offsets[15] = 		24;
        unit_offsets[16] = 		25;
        unit_offsets[17] = 		26;
        unit_offsets[18] = 		27;
        unit_offsets[19] = 		28;
        unit_offsets[20] = 		29;
        unit_offsets[21] = 		30;
        unit_offsets[22] = 		31;
        unit_offsets[23] = 		32;
        unit_offsets[24] = 		33;
        unit_offsets[25] = 		34;
        unit_offsets[26] = 		35;
        unit_offsets[27] = 		36;
        unit_offsets[28] = 		37;
        unit_offsets[29] = 		38;
        unit_offsets[30] = 		39;
        unit_offsets[31] = 		40;
        unit_offsets[32] = 		41;
        unit_offsets[33] = 		42;
        unit_offsets[34] = 		43;
        
        return unit_offsets;
    }
    
    private static final String[] CO_NAMES = defineCONames();
    
    private static String[] defineCONames()
    {
        String[] weapon_names = new String[ NUM_CO_SLOTS ];
        
        weapon_names[0] = WILL;
        weapon_names[1] = COP;
        weapon_names[2] = BRENNER;
        weapon_names[3] = COP;
        weapon_names[4] = LIN;
        weapon_names[5] = COP;
        weapon_names[6] = ISABELLA;
        weapon_names[7] = COP;
        weapon_names[8] = TASHA;
        weapon_names[9] = COP;
        weapon_names[10] = GAGE;
        weapon_names[11] = COP;
        weapon_names[12] = FORSYTHE;
        weapon_names[13] = WAYLON;
        weapon_names[14] = COP;
        weapon_names[15] = GREYFIELD;
        weapon_names[16] = COP;
        weapon_names[17] = PENNY;
        weapon_names[18] = COP;
        weapon_names[19] = TABITHA;
        weapon_names[20] = COP;
        weapon_names[21] = CAULDER;
        
        return weapon_names;
    }
    
    private static final String[] UNIT_NAMES = defineUnitNames();
    
    private static String[] defineUnitNames()
    {
        String[] unit_names = new String[NUM_LABELS];
        
        unit_names[0] = ATK;
        unit_names[1] = BLANK;
        unit_names[2] = DEF;
        unit_names[3] = BLANK;
        unit_names[4] = COZ;
        unit_names[5] = MOV;
        unit_names[6] = HEAL;
        unit_names[7] = VIS;
        unit_names[8] = RANGE;
        unit_names[9] = INF;
        unit_names[10] = MECH;
        unit_names[11] = BIKE;
        unit_names[12] = RECON;
        unit_names[13] = FLARE;
        unit_names[14] = AA;
        unit_names[15] = TANK;
        unit_names[16] = MTANK;
        unit_names[17] = WTANK;
        unit_names[18] = ARTY;
        unit_names[19] = ROCKET;
        unit_names[20] = MISSL;
        unit_names[21] = RIG;
        unit_names[22] = FIGHT;
	unit_names[23] = BOMBR;
	unit_names[24] = DUST;
	unit_names[25] = SEAPL;
	unit_names[26] = BCOPT;
	unit_names[27] = TCOPT;
	unit_names[28] = BSHIP;
	unit_names[29] = CARR;
	unit_names[30] = SUB;
	unit_names[31] = CRUISER;
	unit_names[32] = LAND;
	unit_names[33] = GUNB;
	unit_names[34] = ANTI;
        
        return unit_names;
    }
    
    private RandomAccessFile dataFile;
    
    private JScrollPane listScroller;
    
    private JList COList;
    
    private JLabel[] unitLabels;
    
    private JTextField[] input;
    
    private JButton save;
    
    public AWDoRCOEditor( RandomAccessFile file )
    {
        dataFile = file;
        
        setTitle( TITLE );
        setSize( WINDOW_WIDTH + 6, WINDOW_HEIGHT + 38 );
        setLayout( null );
        
        COList = new JList( CO_NAMES );
        COList.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );
        COList.addListSelectionListener( new COListListener() );
        
        listScroller = new JScrollPane( COList );
        listScroller.setBounds( 0, 0, LIST_WIDTH, LIST_HEIGHT );
        
        add( listScroller );
        
        unitLabels = new JLabel[ NUM_LABELS ];
        input = new JTextField[ NUM_LABELS ];
        
        for( int i = 0; i < NUM_LABELS; i++ )
        {
            unitLabels[i] = new JLabel( UNIT_NAMES[i] );
            unitLabels[i].setBounds( LIST_WIDTH + ( ( i / NUM_ROWS ) * BLOCK_WIDTH ),
                    ( i % NUM_ROWS ) * BLOCK_HEIGHT, LABEL_WIDTH, BLOCK_HEIGHT );
            add( unitLabels[i] );
            
            input[i] = new JTextField();
            input[i].setBounds( LIST_WIDTH + ( ( i / NUM_ROWS ) * BLOCK_WIDTH ) + LABEL_WIDTH,
                    ( i % NUM_ROWS ) * BLOCK_HEIGHT, BOX_WIDTH, BLOCK_HEIGHT );
            add( input[i] );
        }
        
        save = new JButton( SAVE );
        save.setBounds( 0, NUM_ROWS * BLOCK_HEIGHT, WINDOW_WIDTH, BUTTON_HEIGHT );
        save.addActionListener( new SaveButtonListener() );
        
        add( save );
        
        COList.setSelectedIndex( 0 );
        loadIndex( 0 );
        
        setResizable( false );
        setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        setVisible( true );
    }
    
    private void loadIndex( int i )
    {
        try
        {
            for( int j = 0; j < NUM_LABELS; j++ )
            {
                dataFile.seek( START_INDEX + WEAPON_OFFSETS[i] + UNIT_OFFSETS[j] );
                input[j].setText( String.valueOf( dataFile.readByte() ) );
            }
        }
        catch( IOException ex )
        {
        }
    }
    
    private void saveIndex( int i )
    {
        try
        {
            for( int j = 0; j < NUM_LABELS; j++ )
            {
                dataFile.seek( START_INDEX + WEAPON_OFFSETS[i] + UNIT_OFFSETS[j] );
                dataFile.writeByte( Integer.parseInt( input[j].getText() ) );
            }
        }
        catch( NumberFormatException ex )
        {
            JOptionPane.showMessageDialog( null, "Error!", "Not a valid number", 0 );
        }
        catch( IOException ex )
        {
        }
    }
    
    private class COListListener implements ListSelectionListener
    {
        public void valueChanged( ListSelectionEvent le )
        {
            if( le.getSource() == COList )
                loadIndex( COList.getSelectedIndex() );
        }
    }
    
    private class SaveButtonListener implements ActionListener
    {
        public void actionPerformed( ActionEvent ae )
        {
            if( ae.getSource() == save )
                saveIndex( COList.getSelectedIndex() );
        }
    }
}
Delta_Angelfire wrote:huh, that code doesn't actually look all that complicated. Now if only I knew how to make a jar file, I might be able to fix it myself... but google gives me nothing helpful.
To make a jar file, first you have to compile the .java files using javac. Open the command line and type in:

(directory where Java is installed)\jdk\bin\javac (class name).java

Here is one way to make a jar file:

(directory where Java is installed)\jdk\bin\jar cfe (file name).jar (class name) *.class

For example, this is what I put in to compile the new editor:

Code: Select all

C:\Sun\SDK\jdk\bin\javac AWDoRCOEditor.java
C:\Sun\SDK\jdk\bin\jar cfe awdor_co_edit.jar AWDoRCOEditor *.class
Last edited by CodeReaper on Tue Jun 17, 2008 11:14 am, edited 2 times in total.

User avatar
Delta_Angelfire
Location: Oblivion

Re: Let's start a brave New World.

Post by Delta_Angelfire » Tue Jun 17, 2008 6:51 am

eh... I guess it's not as easy as I thought (not being a java programmer after all)... I just could notice a lot of similarities to gml. When I try to run the new jar file I get a "could not find main class" error.

Also, with the one you posted, I keep getting "not a valid number" errors. When it loads a negative value, it uses the positive value instead (255 instead of -1) and it won't save if any value exists larger 128. It can be worked around... but it's troublesome not being able to make quick negative number adjustments while tweaking.

CodeReaper
Rank: Syogun Changer
Location: TX, USA

Re: Let's start a brave New World.

Post by CodeReaper » Tue Jun 17, 2008 8:23 am

Delta_Angelfire wrote:eh... I guess it's not as easy as I thought (not being a java programmer after all)... I just could notice a lot of similarities to gml. When I try to run the new jar file I get a "could not find main class" error.
Uh oh. Which operating system are you using? Have you updated to Java 1.6?
Delta_Angelfire wrote:Also, with the one you posted, I keep getting "not a valid number" errors. When it loads a negative value, it uses the positive value instead (255 instead of -1) and it won't save if any value exists larger 128. It can be worked around... but it's troublesome not being able to make quick negative number adjustments while tweaking.
I put in a byte mask (255) in the load method to make everything positive. I'll remove it for you. As for values >= 128, using Integer.parseInt instead of Byte.parseByte should fix it.

EDIT: Updated. Added new download link.

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Re: Let's start a brave New World.

Post by Xenesis » Tue Jun 17, 2008 12:01 pm

Uh oh. Which operating system are you using? Have you updated to Java 1.6?
Actually, I found that I had a problem getting valid Jar files to work for a while until I commented out the code relating to using specific fonts you specified and recompiled, for the old versions.

I haven't had a chance to look at the new stuff yet though.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

User avatar
Delta_Angelfire
Location: Oblivion

Re: Let's start a brave New World.

Post by Delta_Angelfire » Tue Jun 17, 2008 12:58 pm

yeah, I'm using 1.6.0_6 on windows XP pro

Ah well, I should probably study up some more before I try more tinkering. I'm sure it's probably something stupid I overlooked.

Thanks for the update :-)

User avatar
Gheizen64

Re: AWDoR CO Data Hacking (Now with editor)

Post by Gheizen64 » Thu Nov 06, 2008 4:15 am

Negative Healing won't works for me...

Also, healing on COP won't work. Is there a simple way of solving this? I can't figure a thing from Hexpose.
AW:DoR Friend code - 421050986296 (for testing with hacked roms)
AW:DC Friend code - don't remember right now

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Re: AWDoR CO Data Hacking (Now with editor)

Post by Xenesis » Thu Nov 06, 2008 9:10 am

Both those won't work because they're not designed to work that way. All of the COZ abilities are just that - Abilities with the CO Zone. There's nothing you can do for a CO Power there apart from stats as under a COP the zone is infinite.

Negative Healing would be icky to work with to say the least (It's definitely not as simple as just take 1HP :/ ). And as for healing on the COP, you'll find that it's got a lot of assembly code related to it and Brenner has his own custom set that activates when he goes all COP.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

Platinum_Dragon
Rank: The Late
Location: California

Re: AWDoR CO Data Hacking (Now with editor)

Post by Platinum_Dragon » Mon Dec 01, 2008 3:50 pm

You forgot The Beast, and No CO

The Beast - 1242AD
No CO - 12433D

Just to complete the list.
Most topics are 6 months old. It is so tempting to revive them.

As I'm consider 80 percentile or better for my age group, My Brain Age and Wii Sport's Fitness Test says I'm 60 years old before I complete my first two decade of life.

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Re: AWDoR CO Data Hacking (Now with editor)

Post by Xenesis » Mon Dec 01, 2008 4:03 pm

Well, you can't normally select the beast and you can't deploy the CO as no CO, so it's kinda irrelevant. But whatever.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

Platinum_Dragon
Rank: The Late
Location: California

Re: AWDoR CO Data Hacking (Now with editor)

Post by Platinum_Dragon » Mon Dec 01, 2008 4:09 pm

But if you have the zone as the entire screen, then that is something. Just a thought.
Most topics are 6 months old. It is so tempting to revive them.

As I'm consider 80 percentile or better for my age group, My Brain Age and Wii Sport's Fitness Test says I'm 60 years old before I complete my first two decade of life.

User avatar
Xenesis
Tri-Star CO
Tri-Star CO
Rank: Hydrocarbon Inspector
3DS Code: 2535-4646-7163
Location: 0x020232DD

Re: AWDoR CO Data Hacking (Now with editor)

Post by Xenesis » Mon Dec 01, 2008 4:13 pm

But you can't get the zone until you deploy a CO in a unit.
IST wrote:Even the worst individual needs to discover the joys of a chicken statue that is also a pregnant blonde housewife.

Platinum_Dragon
Rank: The Late
Location: California

Re: AWDoR CO Data Hacking (Now with editor)

Post by Platinum_Dragon » Mon Dec 01, 2008 4:18 pm

Recon VS Recon base damage is 35, but The Beast at 150 gave me 6 damage. Yeah, with "Zone 6" then it works, but only full screen effects can be used.

Edit: essentially, you're using no CO for most of the game until "you know when," so the no CO stats, if changed, can make campaign easier or harder.

Edit: There should be a code to enable The Beast, but that probably take years to find.
Most topics are 6 months old. It is so tempting to revive them.

As I'm consider 80 percentile or better for my age group, My Brain Age and Wii Sport's Fitness Test says I'm 60 years old before I complete my first two decade of life.

User avatar
Heroic Spyro
Rank: Legendary Purple Dragon
Location: United States

Re: AWDoR CO Data Hacking (Now with editor)

Post by Heroic Spyro » Wed Dec 10, 2008 12:43 am

You forget another CO
Davis
Davis music theme is the same as The Beast. Davis is on Chapter-11.

User avatar
Delta_Angelfire
Location: Oblivion

Re: AWDoR CO Data Hacking (Now with editor)

Post by Delta_Angelfire » Wed Dec 10, 2008 3:36 am

Platinum_Dragon wrote:Recon VS Recon base damage is 35, but The Beast at 150 gave me 6 damage. Yeah, with "Zone 6" then it works, but only full screen effects can be used.

Edit: essentially, you're using no CO for most of the game until "you know when," so the no CO stats, if changed, can make campaign easier or harder.

Edit: There should be a code to enable The Beast, but that probably take years to find.
I don't understand, what exactly did you do and what exactly does it affect? Do your changes affect all units when you don't have your CO deployed, or only when you select "No CO"? Or does it only affect the beats and won't affect your units at all since you can't select the Beast? Do the "NoCO" stats affect all units if you put it to a zone of 6? Please explain more clearly.

Who is online

Users browsing this forum: Multivac [Bot] and 0 guests