Original Post Title: Knytt Stories: External sprites for standard objects and other mods
I was remarking the other day on how I'd like to be able to switch out the embedded game graphics of Knytt Stories with my own. In followup to this idea I downloaded the MMF2 demo and began tinkering with the source. After a few false starts I managed to get satisfying results.
Video Edit: Thanks for the correct link Miss Paula
As the video says the graphics are stored in the Custom Object folder of the level folder. These are the World.ini entries used in the video:
;Spider
[Custom Object 1]
Image=4-9.png
Tile Width=48
Bank=4
Object=9
;Bad Flything
[Custom Object 2]
Image=2-2.png
Bank=2
Object=2
;Forest Girl
[Custom Object 3]
Image=3-14.png
Bank=3
Object=14
;Cauldron
[Custom Object 4]
Image=10-3.png
Bank=10
Object=3
;Roto Robo
[Custom Object 5]
Image=13-13.png
Bank=13
Object=13
;Dropstuff Robot
[Custom Object 6]
Image=13-5.png
Bank=13
Object=5
;Roto Robo graphic on a Dropstuff object
[Custom Object 7]
Image=13-13.png
Bank=13
Object=5
;The Absurd Spiker requires size and offset declarations.
[Custom Object 8]
Image=14-16.png
Tile Width=120
Tile Height=72
Offset Y=-24
Bank=14
Object=16
In the game engine I allow the screen generation to proceed normally, except after Custom Objects are created I check to see if Bank/Object tags were declared. If so, a clone version of the standard object which Bank/Object tags describe is created. It and the Custom Object are given the same ID. The standard object behaviors that are relevant to the Custom Object are moved to the Render Object section. I match objects by ID, and program behaviors as necessary.
If you didn't catch all that, don't worry. The hard part is done. Creating all the clones and transferring their behaviors to Custom Objects is easy, but time consuming. I'm using the one month demo of MMF2, so I plan to spend the rest of the time figuring out how to implement the other features I want.
I can't compile the game. I can only save it as source. Right now my plans are to provide the altered source when I can no longer play with it.
[mod]Removed code tag in the spoiler. It somehow breaks the spoiler in not showing everything.[/mod]
Edit: I changed the topic title to reflect the entirety of the thread