Advertiser Content

/JASHIN/

Age 25
Male
Canada
Seen 4 Weeks Ago
Posted June 18th, 2019
50 posts
314 Days
I'm looking for a way to turn off the bag in certain trainer battles (i.e. gym battles) I know I can edit the items in an item editor to turn off their "in battle capacity", but I'd like to be able to turn it on or off. I realise that the game does this for link battles, is there a way to set this up?
POKEMON PULSAR VERSION PHASE 02 THREAD: https://www.pokecommunity.com/showthread.php?t=421565
(Phase 02 Trailer Coming Soon)


POKEMON PULSAR VERSION PHASE 01 TRAILER:https://www.youtube.com/watch?v=5vpuR7c2XGY
(Formerly known as Pokemon Jashin Version)


-Praise Be To Jashin

/JASHIN/

Age 25
Male
Canada
Seen 4 Weeks Ago
Posted June 18th, 2019
50 posts
314 Days
Just use writebytetooffset to set items battle usage to 0 and in after battle script use writebyteoffset to change if its usable in battles.
Thanks, so i've been messing around with trying to make the POTION unusable during a battle with no avail... This is the script I'm using

Spoiler:
#dynamic 0x*******

#org @start
lock
faceplayer
checkflag 0x***
if 0x1 goto @later
writebytetooffset 0x00 0x3db284 (This is the byte that changes from 01 to 00 or vice versa when editing its usability in an item editor. I've manually tested it in HxD and this is infact the correct byte.)
trainerbattle @before @after @later
end

#org @later
msgbox @talk1 0x6
writebytetooffset 0x01 0x3db284
release
end

#org @talk1
random, I got my butt kicked text

#org @before
random text

#org @after
more random text


For whatever reason, the game isn't changing that byte before or after the battle (I've tried both). I've also tried having a script tile that reads:
Spoiler:
#dynamic 0x*******
#org @start
writebytetooffset 0x00 0x3db284
release
end


Still no luck with this either. Any help with this would be greatly appreciated. I don't know why the byte won't change. I'm not sure if I'm missing a command here or something.
POKEMON PULSAR VERSION PHASE 02 THREAD: https://www.pokecommunity.com/showthread.php?t=421565
(Phase 02 Trailer Coming Soon)


POKEMON PULSAR VERSION PHASE 01 TRAILER:https://www.youtube.com/watch?v=5vpuR7c2XGY
(Formerly known as Pokemon Jashin Version)


-Praise Be To Jashin
Seen July 24th, 2019
Posted May 23rd, 2019
88 posts
2.8 Years
writebytetooffset 0x00 0x3db284
This won't work because you're trying to write an offset to the ROM (read-only memory). If you want a value to change throughout the game, you must write it to the RAM (read-access memory). In this specific instance, you will likely need some assembly or C routine to check if some value is set in the RAM (eg. a flag), and prevent the BAG text from doing anything in battle.

/JASHIN/

Age 25
Male
Canada
Seen 4 Weeks Ago
Posted June 18th, 2019
50 posts
314 Days
This won't work because you're trying to write an offset to the ROM (read-only memory). If you want a value to change throughout the game, you must write it to the RAM (read-access memory). In this specific instance, you will likely need some assembly or C routine to check if some value is set in the RAM (eg. a flag), and prevent the BAG text from doing anything in battle.
Thanks for the info! I'm surprised no one has done this for some type of battle facility :/ I'm good with coding, hex editing, etc, but when it comes to ASM I fall short.
POKEMON PULSAR VERSION PHASE 02 THREAD: https://www.pokecommunity.com/showthread.php?t=421565
(Phase 02 Trailer Coming Soon)


POKEMON PULSAR VERSION PHASE 01 TRAILER:https://www.youtube.com/watch?v=5vpuR7c2XGY
(Formerly known as Pokemon Jashin Version)


-Praise Be To Jashin
Advertiser Content