Toggle shoutbox Shoutbox
|
Non-standard Ranges
#1
Posted 25 March 2014 - 07:52 AM
I was attempting to use the Nightmare Item Module to give longbows 3-5 range. However, when I enter 35 into the Minimum-Maximum Range box and test it in-game, it says that the longbow has --- range and cannot be used. This confused me, so I looked at the Ballista data, which uses 3A (3-10) and 3F (3-15). When I tried these for the longbow, the game recognized it accordingly. Of course, standard ranges likes 11, 22, 23, and 12 worked without any issues.
Am I missing something incredibly obvious here, or am I limited to the standard weapon ranges seen in game?
Latest update: Ch1 Test v1.2
Updated 04/21/14
+ Visual updates
+ Fixed a potentially out-of-sequence event bug
+ Fixed typos
Full Changelog: via Google Drive
Save Files: via Google Drive
#2
Posted 25 March 2014 - 04:36 PM
I believe in judgment of humans through their judgment of fiction, for nothing else tells better of their disposition freed from apprehension.
#3
Posted 26 March 2014 - 02:36 AM
Latest update: Ch1 Test v1.2
Updated 04/21/14
+ Visual updates
+ Fixed a potentially out-of-sequence event bug
+ Fixed typos
Full Changelog: via Google Drive
Save Files: via Google Drive
#4
Posted 22 May 2014 - 08:46 AM
#5
Posted 22 May 2014 - 05:03 PM
Signature thanks to Shu.
#6
Posted 22 May 2014 - 07:17 PM
The rule is simple. Before function bl$0801a2d4, put r2 = max value, and r3 = 1. After the function, before neg r3,r3, put r2 = min value -1 and r3 = 1.
#7
Posted 24 May 2014 - 08:19 PM
Okay, who ARE you? XD
Could you maybe elaborate on that more or give an example for those not versed in ASM to help people out? It seems like it'd really be helpful for people if it allows for ranges beyond the given ranges.
Also, I have this sneaking suspicion you're actually a really skilled hacker, perhaps someone who went under another name before, or something, because you're certainly more skilled than I am (which isn't saying much, but still...).
Signature thanks to Shu.
#8
Posted 26 May 2014 - 06:13 AM
The method is by bit check (The value will be refered as BC).
First step. Assigning each range area into reach range (This should be easy)
Default
Subtract Range with 0x11 (since we want it started from range 0x11)
Compare with 0x2e. If higher, set BC = 0, then quit.
Use subtracted range to jump into directed instruction, which will give new value for BC, then quit.
My approach. (start from 08016DC4)
cmp r0,0x3f or use other range limit in hex.
bhi 08016EB8 quit if unlisted, after set the range area into 0.
r1 = ADR0 set the address of Memory block
r1 = r0 + r1 set the exact address of the range area
ldr r0(r1,0) Load the range area.
b$ 08016EBA quit
Second step. Range modifier. (IMO this is the most confusing)
Since we're using single block only, there is (more than) enough space to write. First, we need an unused dynamic address for it(and it exists).
What we need to do is checking BC starting from its MSB (http://en.wikipedia....significant_bit), or its longest range limit.
We need to store BC before it's rewritten, and check the value everytime before set/unset range.
---edit start from here---
01 cmp r0,0x00
02 bne jump 1 step
03 b$ 0801ab72
04 r1 = ADR1
05 strh r0(r1,0x00)
06 strh r0(r1,0x04)
07 b$ 0801a53c
0801a59a b$ #08
08 r2 = ADR1
09 r3 = 0x04
10 strh r3(r2,0x02)
11 ldrh r3(r2,0x04)
12 strh r3(r2,0x00)
13 r0 = r4
14 r1 = r6
15 ldrh r3(r2,0x00)
16 lsl r3,r3,0x10
17 cmp r3,0x0
18 blt #22
19 bl #increment
20 ----
21 b$ #15
22 bl #increment
23 ----
24 r2 = ADR2
25 ldrb r2(r2,r3)
26 r3 = 1
27 bl 0801a2d4
28 ----
29 r0 = r4
30 r1 = r6
31 r2 = ADR1
32 ldrh r3(r2,0x00)
33 lsl r3,r3,0x10
34 cmp r3,0x0
35 bge #39
36 bl #increment
37 ----
38 b$ #32
39 bl #increment
40 ----
41 r2 = ADR2
42 ldrb(r2,r3)
43 r3 = 1
44 neg r3,r3
45 bl 0801a2d4
46 ----
47 r1 = ADR1
48 ldrh r0(r1,0x00)
49 cmp r0,0
50 bne #13
51 b$ 0801A5B4
bl #increment
00 push lr
01 lsr r3,r3,0x0f
02 strh r3(r2,0x00)
03 ldrh r3(r2,0x02)
04 r3 = r3 - 1;
05 strh r3(r2,0x02)
06 pop r3
07 bx r3
We can write #08 - #51 and the function start from 0801A5D8 (There is enough space for more than 600 instruction anyways...)
The reason is... Too lazy to copy all of them (If you're willing to type all of them, just exchange #07 with everything from 0801A53C to 0801A598.
I mean copy the instruction, not the code.), and edit #51 respectively.
About the Hex instruction, just open GBATEK.
The next part is divided into 3 parts. #08-#10 for initialization, #13-#28 for setting range area, #29-#46 for unsetting range area.
Since we want our last step as unsetting range area, Break code is added after unsetting area (#45-#49)
ADR1 = unused dynamic address(what I've said before)
ADR2 = Memory block for range limit
Third step. Range Modifier on Screen 2.
Basically, the method is THE SAME AS #08 to #48 above (Aside from using r5 instead of r6). #51? Just leap it into the end(b$ 0801AE08), the same as #03.
Start from 0801AC6C, and write #01-#06, and then #08-#51. As for the function(bl #increment), just use the one you use in the previous step.
Fourth step. Name (Or Leave it if you want your new range --)
I'm assumming that you HAVE enough space for it's index.
The Address is from 080168D2
r0 = ADR3
r0 = r0 + r1
r0 = r0 + r1
ldrh r0(r0,r0)
b$ 0801693c
Just add 2 (or 3) more byte for the address of ADR3 (memory block of index name).
The next thing to do is create the text for the range.
I'm sure you can do it better than I am, Blazer(I have no experience in this anyway).
As for unused dynamic address, I'm using 03007DF4
Ah, forget the most important part.
Binary check is used to split range area limit, so please write them in increasing order (There, I fix them so that it can be implemented in increasing order.)
Example:(Default case)
Bit => Range
0 => 1
1 => 2
2 => 3
3 => should be 4-10, since 0x0C means 0x3a range
#10
Posted 14 June 2014 - 05:32 AM
#12
Posted 14 June 2014 - 11:42 PM
FE8's, too.
I believe in judgment of humans through their judgment of fiction, for nothing else tells better of their disposition freed from apprehension.
#14
Posted 15 June 2014 - 08:34 PM
Signature thanks to Shu.
#15
Posted 15 June 2014 - 10:09 PM
I mostly asked because the original opening of the game always feels out of place in a hack unless it's as reskin as possible, and it's the first thing you see so.
I believe in judgment of humans through their judgment of fiction, for nothing else tells better of their disposition freed from apprehension.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users