Codes
WiiRd forum
March 29, 2024, 05:19:37 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome on the new server

Update 4.3 - do NOT update!
Gecko 1.9.3.1
Should I get a USB Gecko, I wanna hack?
How do I use my USB Gecko
Where can I get WiiRd?
 
   Home   CODE DATABASE GAMEHACKING Help Search Login Register  
Pages: 1 ... 8 9 [10] 11 12 ... 16
  Print  
Author Topic: Xenoblade Chronicles [SX4P01]  (Read 75319 times)
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #135 on: September 02, 2011, 04:44:58 PM »

I'm trying to REDUCE the exp multiplier and had a bit of success by using:
040C1550 1F45xxxx - although it was semi-successful, I have the feeling that I'm going about this all the wrong way (shifting bits?)

1F = multiply instruction?
44 = offset in memory to multiply with?
xxxx = unsigned 16-bit integer?

0x1F44XXXX = mulli r26,r4,0xXXXX.  The 1F doesn't neatly map to "mulli"; the first 6 bits, 0x1C, are the op code for mulli.  The next five bits are the first register operand, the next five bits are the second register operand, and the last 16 bits are the immediate.

You could get by using right-shifts to divide by powers of 2, but that will only get you .5, .25, .125, etc.  Not very practical.  You could use fixed point multiplies but that's pretty difficult for other people to customize.

I too am extremely interested in this, and I know quite a few other people who would be too. Unfortunately my USB Gecko broke.  Undecided

Exactly how successful was your attempt? What value did you use?

I'm pretty sure it's just standard integer multiplication. We need some float multiplication.


Quote
Original codes:
$EXP multiplier [Thomas83Lin]
040C1550 1F44xxxx
**Ported from Unknown*

$AP multiplier [Thomas83Lin]
040C1554 1F65xxxx
**Ported from Unknown*

$SP multiplier [Thomas83Lin]
040C1558 1F86xxxx
**Ported from Unknown*

This code will do all three.  I don't have this game and can't test it, but I'm reasonably sure it will work.

This code uses the red zone.  The red zone is addressed by using "negative stack frames", i.e. -8(r1) and -4(r1).  It allows you to avoid creating a stack frame if you don't need to, but you must be careful because the USB Gecko debugger will over-write this area if you step through it.  Hence why it's a "red" zone.

Some important things to note about the PowerPC architecture.  1) Double-precision instructions can take single-precision operands, but the result is double-precision.  That is why I can fmuls and then fctiwz and then stfd.  2) Single-precision instructions can take double-precision operands, but produce single-precision results.  That is why I can lfd and then fsubs.

Spoiler for source:
hook  800C1558:  7CDC3378   mr   r28,r6

# multipliers

bl _SKIP_DATA
.float 1.0      # EXP
.float 1.0      # AP
.float 1.0      # SP
_SKIP_DATA:

# load fregs

lfd f12,-32360(r2)   # load magic float into f12, -32360(r2) varies for each game and region
stfd f12,-8(r1)      # store magic float onto stack to create the 0x43300000

xoris r26,r4,0x8000   # load flipped-int
stw r26,-4(r1)      # store flipped-int to stack
lfd f11,-8(r1)      # load flipped-int into f11
fsubs f11,f11,f12   # normalize f11

xoris r27,r5,0x8000
stw r27,-4(r1)   
lfd f10,-8(r1)   
fsubs f10,f10,f12   

xoris r28,r6,0x8000
stw r28,-4(r1)   
lfd f9,-8(r1)      
fsubs f9,f9,f12   

# f11/f10/f9 have EXP/AP/SP

mflr r12

lfs f12,0(r12)      # load EXP mul
fmuls f11,f11,f12   # scale EXP

lfs f12,4(r12)      # load AP mul
fmuls f10,f10,f12   # scale AP

lfs f12,8(r12)      # load SP mul
fmuls f9,f9,f12      # scale SP

# store scaled versions

fctiwz f11,f11      # convert from double to int
stfd f11,-8(r1)      # store conversion
lwz r26,-4(r1)      # load conversion

fctiwz f10,f10   
stfd f10,-8(r1)   
lwz r27,-4(r1)   

fctiwz f9,f9      
stfd f9,-8(r1)   
lwz r28,-4(r1)

EXP/AP/SP float multiplier [dcx2]
C20C1558 00000012
48000011 3F800000
3F800000 3F800000
C9828198 D981FFF8
6C9A8000 9341FFFC
C961FFF8 ED6B6028
6CBB8000 9361FFFC
C941FFF8 ED4A6028
6CDC8000 9381FFFC
C921FFF8 ED296028
7D8802A6 C18C0000
ED6B0332 C18C0004
ED4A0332 C18C0008
ED290332 FD60581E
D961FFF8 8341FFFC
FD40501E D941FFF8
8361FFFC FD20481E
D921FFF8 8381FFFC
60000000 00000000
modified base on Thomas83lin/Unknown's work.  The three 3F800000's at the beginning are the EXP, AP, and SP multipliers in single-precision floating-point format.  3F800000 = 1.0, 3F000000 = 0.5, 3F400000 = 0.75, 3FC00000 = 1.5 etc

EXP only multiplier [dcx2]
C20C1550 00000008
48000009 3F800000
C9828198 D981FFF8
6C9A8000 9341FFFC
C961FFF8 ED6B6028
7D8802A6 C18C0000
ED6B0332 FD60581E
D961FFF8 8341FFFC
60000000 00000000
Again with the 3F800000 = 1.0, 3F000000 = 0.5, 3F400000 = 0.75, 3FC00000 = 1.5 etc
« Last Edit: September 03, 2011, 01:23:23 AM by dcx2 » Logged

Thomas83Lin
Hacker
Hero Member
*****

Karma: 86
Posts: 678


« Reply #136 on: September 02, 2011, 05:14:03 PM »

Nice work, i was going to mod the percentage when wearing a Exp gem, but that works better. i tested the code seems to be working well.

edit:
Just posted some party modifier's in the main thread, Its still a work in progress but its something for now.
« Last Edit: September 02, 2011, 10:02:58 PM by thomas83lin » Logged
MechaCloud
Newbie
*

Karma: 1
Posts: 2


« Reply #137 on: September 02, 2011, 11:21:23 PM »

some more amazing codes guys good work keep it up =)
Logged
mugwhump
Hacker
Newbie
*****

Karma: 0
Posts: 49


« Reply #138 on: September 03, 2011, 01:09:37 AM »

Thank you, dcx2. You are a wonderful person.

When you go to heaven, you'll probably get 8 extra virgins for this. Which would give you 80 virgins.
Logged
squall23
Newbie
*

Karma: 0
Posts: 48


« Reply #139 on: September 03, 2011, 05:26:26 AM »

Has anybody found out if each quest gives a permanent set amount of affinity for the cities or is it changeable?  If it is changeable, would it be hard to do?  Hopefully something along the lines of a multiplier?
Logged
Rikkado
Newbie
*

Karma: 0
Posts: 15


« Reply #140 on: September 03, 2011, 06:13:05 AM »

The max gem slots for all selected equipment code works perfectly fine for me.

Thanks a bunch!!
Logged
Black Knight666
Newbie
*

Karma: 0
Posts: 30


« Reply #141 on: September 03, 2011, 08:20:43 PM »

can you make a code that let you change the color of the armor???
« Last Edit: September 03, 2011, 08:25:26 PM by Black Knight666 » Logged
lxThunderxl
Newbie
*

Karma: 0
Posts: 2


« Reply #142 on: September 04, 2011, 12:27:01 PM »

hey guys,

i got a problem with the following code for Xenoblade Chronicles, because i tought it would make my char run faster:
Quickness (ALL Characters) [Thomas83Lin]
C217A0BC 00000004
2C1D0000 40820010
3B40270F B35F166E
48000008 AB5F166E
60000000 00000000

but instead of makeing them faster the AGI of the party members ( these that fight) was decreased.
now for the first 2 its on 1 and for the 3rd its on 31... so i wanted to know if there is maybe a code to increase the AGI ( already searched on geckcodes.org)

i hope you can help me, because its verry annoying if the chars fail with hitting enemies
Logged
Thomas83Lin
Hacker
Hero Member
*****

Karma: 86
Posts: 678


« Reply #143 on: September 04, 2011, 02:57:36 PM »

That code is for Agility, thats how zit worded it, and i keep the original name when porting it,

Quickness (ALL Characters) [Thomas83Lin]
C217A0BC 00000004
2C1D0000 40820010
3B40270F B35F166E
48000008 AB5F166E
60000000 00000000
*Ported from Zit*

this value 270F=9999d I'm thinking maybe you already had high Agility so it went negative, try re-enabling the code while lowering this Value to something like  1387

edit:
Removed my ported Zit Max Stat codes from the database they by themselves could mess your stats up later in the game as you leveled up. They are still in the main thread contained in a spoiler though. I've fixed this in my combined re-hack v.2 version.

« Last Edit: September 05, 2011, 11:51:03 AM by thomas83lin » Logged
lxThunderxl
Newbie
*

Karma: 0
Posts: 2


« Reply #144 on: September 04, 2011, 03:28:22 PM »

thank you very much .. worked perfect Cheesy
Logged
Riccalder
Newbie
*

Karma: 0
Posts: 28


« Reply #145 on: September 04, 2011, 05:24:13 PM »

According to some posters on the Gamefaqs forums, there's a problem with the exp code in that it doesn't affect any party members who aren't in your active party, they still gain exp normally, potentially massively skewing their levels in the long run.  I would test this but I'm not far enough to have any other party members.


I'd also like to know what the multiplier for 25% of normal growth is.  I'm substantially overlevelled from quests and my characters are going to need an exp diet to reach a more reasonable level.


Though, monster exp isn't really the problem, it's that quests provide far too much exp if you do a lot of them.  If it could be done, what this game really needs is a "reduce quest exp 90%" code that leaves other forms of exp untouched.  Otherwise quests would still be by far the best way to level, it would just take longer.
« Last Edit: September 04, 2011, 05:29:03 PM by Riccalder » Logged
dcx2
Computer Engineer
Moderator
Legendary Member
*****

Karma: 165
Posts: 3468


WWW
« Reply #146 on: September 04, 2011, 05:33:10 PM »

I'd also like to know what the multiplier for 25% of normal growth is.

0.25 = 3E800000 (you can use http://www.geckocodes.org/index.php?arsenal=3 to get any value) therefore

25% EXP [dcx2]
C20C1550 00000008
48000009 3E800000
C9828198 D981FFF8
6C9A8000 9341FFFC
C961FFF8 ED6B6028
7D8802A6 C18C0000
ED6B0332 FD60581E
D961FFF8 8341FFFC
60000000 00000000
based on Thomas83lin/Unknown's code

Note that I don't actually have this game, so I can't find a new hook to fulfill the rest of your request.
Logged

Thomas83Lin
Hacker
Hero Member
*****

Karma: 86
Posts: 678


« Reply #147 on: September 04, 2011, 05:51:14 PM »

Here just made a code for the reserve characters

Max Exp on Gain for Reserve Characters [Thomas8Lin]
040A304C 60000000

No Exp Gain [Thomas83Lin]
040A3044 60000000
040C1550 3B400000
040A2C04 3AE00000
*Based on Unknowns code*

@dcx2 i believe the EXP multiplier v2 codes i ported effect the Reserve characters aswell.
« Last Edit: September 04, 2011, 06:54:37 PM by thomas83lin » Logged
Riccalder
Newbie
*

Karma: 0
Posts: 28


« Reply #148 on: September 04, 2011, 06:59:46 PM »

Quartered Exp definitely works for active party members, I tested monster kills and quest exp and both are reduced appropriately.  This should definitely help my level get back in line.


I do think though that quest exp is the main reason it gets out of whack, if a modifier could be found for that specifically it would be awesome.
Logged
mugwhump
Hacker
Newbie
*****

Karma: 0
Posts: 49


« Reply #149 on: September 04, 2011, 08:33:35 PM »

dcx2, do you know if that code will round the results up or down? Because often killing monsters only nets you 1 SP, so it would suck if that got rounded down. tongue
Logged
Pages: 1 ... 8 9 [10] 11 12 ... 16
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!