Log In  

I have a question about the reload() function
this function allows you to load a region of data from the original cartridge, or another cartridge, into memory.
Now reading from wiki: "If the optional filename argument is provided, reload() will attempt to load from that cartridge file, which does not need to be the currently loaded cartridge. You can use this to store large amounts of game data over multiple cartridges."
I want to load a data from another cartridge, but it isn't posible to load a data using bbs id or filename when uploaded to bbs.
What I should do to make possible to load data from another cartridges using reload()?
(Sorry fo bad english)

P#105025 2022-01-13 19:03

:: dw817
2

Yes you can, @Lolscope.

In fact you can read graphics from another cart entirely using this:

reload(0,0,8192,"cart2.p8")

Where you are working on a cart called cart1.p8 and want to import the graphics of nearby cart2.p8

That command above will import the graphics for cart2.p8 and allow you to use its sprites while you are running your code.

When your code stops, however, everything is back where it belongs, where cart1.p8 sprites are back.

Experiment with this command and cstore()

Be sure to look them up and their usage HERE:

https://www.lexaloffle.com/dl/docs/pico-8_manual.html

P#105026 2022-01-13 19:41

loading data from another cart: yes (that's what reload is for).
loading data from BBS: no (means that game using reload from another cart cannot be posted to BBS)

P#105027 2022-01-13 19:42

@dw817 @freds72
Okay, thanks for splitting out the use of reload() function
But I have a little different question about using it in practice (when the cart is loaded into bbs)
Because I tried to use this function to load a sprite data from Snowcatcher (using the filename with .p8.png format), but when I tested this cartridge loaded into bbs, it failed.
What I should do?

P#105063 2022-01-14 08:37

as said, reload from a cart from bbs is not supported.
only option is to copy the sprite in your own cart , and then publish that.

P#105075 2022-01-14 12:08

@freds72 okay, thanks anyway ^_^

P#105657 2022-01-26 06:56

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-05-21 22:21:42 | 0.032s | Q:18